package cn.sq.musicserver.plug.model.neteasecloudmusic.entity;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: SQ
 * Date: 2020/12/10
 * Time: 15:54
 * Description: 检测登录状态返回结果
 * interface ： /login/status
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "检测登录状态返回结果", description = "检测登录状态返回结果")
public class LoginStatusResult {


    /**
     * code : 200
     * profile : {"userId":18769859,"nickname":"旅途的人生","avatarUrl":"http://p3.music.126.net/gDLPJmke4wS6l42XAhBskQ==/3329321209025958.jpg","birthday":"-2209017600000","userType":0,"djStatus":0}
     * bindings : [{"expiresIn":2147483647,"expired":false,"tokenJsonStr":"{\"countrycode\":\"\",\"cellphone\":\"156****8424\",\"hasPassword\":true}","refreshTime":1513513765,"id":6506467840,"type":1,"userId":18769859,"bindingTime":1513513621053,"url":""},{"expiresIn":7775999,"expired":true,"tokenJsonStr":"{\"access_token\":\"68FCFED4EEC5D005CCF3E1DA751DAED2\",\"openid\":\"86F6093C4DC0149BDD2BA5C8BBB46699\",\"nickname\":\"喵帕斯\",\"partnerType\":\"0\",\"expires_in\":7775999}","refreshTime":1513513800,"id":6506460898,"type":5,"userId":18769859,"bindingTime":1513513800990,"url":""},{"expiresIn":7200,"expired":true,"tokenJsonStr":"{\"access_token\":\"4_LV0xljflZTAPyvCUpJDOo_QucoMoOFMmj3dn7xgGDqM8AbXoeY8XunaPvbO3RzG9HTuAYLkOVjJCyVGPMCJcG0pUp1GlNJd0i05wp_j9xhs\",\"refresh_token\":\"4_hYHWIX6A6dNURO4cim2U2H_4tLJFbyIO_dWC2wRnIF1zxO70om6GOL2MIkeKCKNctBhJtzcrVmcy1EZJouIyIMkW3NZC_rdhbYH6XUrKi24\",\"unionid\":\"oZoefuNUppNE6lZaLUpHoN6dWKFk\",\"openid\":\"okvmMjrsKqNCyW7liOrl1nh_qqcw\",\"scope\":\"snsapi_userinfo\",\"name\":\"喵帕斯\",\"nickname\":\"喵帕斯\",\"expires_in\":7200}","refreshTime":1513513792,"id":6506375550,"type":10,"userId":18769859,"bindingTime":1513513792369,"url":""},{"expiresIn":2147483647,"expired":false,"tokenJsonStr":"{\"email\":\"sq_shang_qi@163.com\"}","refreshTime":0,"id":8629770,"type":0,"userId":18769859,"bindingTime":0,"url":""}]
     */

    private int code;
    private ProfileBean profile;
    private List<BindingsBean> bindings;
    private String msg;
    private String message;


    @Data
    @EqualsAndHashCode(callSuper = false)
    @Accessors(chain = true)
    public static class ProfileBean {
        /**
         * userId : 18769859
         * nickname : 旅途的人生
         * avatarUrl : http://p3.music.126.net/gDLPJmke4wS6l42XAhBskQ==/3329321209025958.jpg
         * birthday : -2209017600000
         * userType : 0
         * djStatus : 0
         */

        private int userId;
        private String nickname;
        private String avatarUrl;
        private String birthday;
        private int userType;
        private int djStatus;


        public int getUserId() {
            return userId;
        }

        public void setUserId(int userId) {
            this.userId = userId;
        }

        public String getNickname() {
            return nickname;
        }

        public void setNickname(String nickname) {
            this.nickname = nickname;
        }

        public String getAvatarUrl() {
            return avatarUrl;
        }

        public void setAvatarUrl(String avatarUrl) {
            this.avatarUrl = avatarUrl;
        }

        public String getBirthday() {
            return birthday;
        }

        public void setBirthday(String birthday) {
            this.birthday = birthday;
        }

        public int getUserType() {
            return userType;
        }

        public void setUserType(int userType) {
            this.userType = userType;
        }

        public int getDjStatus() {
            return djStatus;
        }

        public void setDjStatus(int djStatus) {
            this.djStatus = djStatus;
        }
    }
    @Data
    @EqualsAndHashCode(callSuper = false)
    @Accessors(chain = true)
    public static class BindingsBean {
        /**
         * expiresIn : 2147483647
         * expired : false
         * tokenJsonStr : {"countrycode":"","cellphone":"156****8424","hasPassword":true}
         * refreshTime : 1513513765
         * id : 6506467840
         * type : 1
         * userId : 18769859
         * bindingTime : 1513513621053
         * url :
         */

        private int expiresIn;
        private boolean expired;
        private String tokenJsonStr;
        private int refreshTime;
        private long id;
        private int type;
        private int userId;
        private long bindingTime;
        private String url;

        public int getExpiresIn() {
            return expiresIn;
        }

        public void setExpiresIn(int expiresIn) {
            this.expiresIn = expiresIn;
        }

        public boolean isExpired() {
            return expired;
        }

        public void setExpired(boolean expired) {
            this.expired = expired;
        }

        public String getTokenJsonStr() {
            return tokenJsonStr;
        }

        public void setTokenJsonStr(String tokenJsonStr) {
            this.tokenJsonStr = tokenJsonStr;
        }

        public int getRefreshTime() {
            return refreshTime;
        }

        public void setRefreshTime(int refreshTime) {
            this.refreshTime = refreshTime;
        }

        public long getId() {
            return id;
        }

        public void setId(long id) {
            this.id = id;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public int getUserId() {
            return userId;
        }

        public void setUserId(int userId) {
            this.userId = userId;
        }

        public long getBindingTime() {
            return bindingTime;
        }

        public void setBindingTime(long bindingTime) {
            this.bindingTime = bindingTime;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }
}
